package com.laolang.pluto.common.logic.impl;

import com.github.pagehelper.PageInfo;
import com.laolang.pluto.common.core.domain.common.Page;
import com.laolang.pluto.common.logic.BaseLogic;
import com.laolang.pluto.common.util.CommonUtil;
import java.util.function.Function;

/**
 * @author laolang
 * @date 2021-07-2021/7/31 18:58
 */
public class BaseLogicImpl implements BaseLogic {
    @Override
    public <T> Page<T> pageInfo2Page(PageInfo<T> pageInfo) {
        return CommonUtil.pageInfo2Page(pageInfo);
    }

    @Override
    public <T, R> Page<R> pageInfo2Page(PageInfo<T> pageInfo, Function<T, R> tranform) {
        return CommonUtil.pageInfo2Page(pageInfo, tranform);
    }
}
